//
//  SetRootViewControllerHandle.m
//  IYoker_Organization
//
//  Created by chunjian Dai on 15/12/17.
//  Copyright © 2015年 wangguimin. All rights reserved.
//

#import "SetRootViewControllerHandle.h"
//#import "UserGuideViewController.h"
#import "LoginViewController.h"
#import "UMMobClick/MobClick.h"
#import <AVFoundation/AVFoundation.h>

@interface SetRootViewControllerHandle ()<NetworkingHandleDelegate>
@end
@implementation SetRootViewControllerHandle
- (void)setRootViewController
{
    //  引导图功能屏蔽
//    //判断是不是第一次启动应用
    if(!self.firstLancher)
    {
        self.firstLancher = YES;


    } else {
        
    }

    
//    
//            [[NetworkManager manager] postWithURL:NET_GETSYSTEMTIME param:nil delegate:self isEncrypt:NO type:NetWorkingType0];
    
//    if (self.isLogin) {
        CustumTabBarController *VC = [[CustumTabBarController alloc] init];
            
        [[UIApplication sharedApplication] delegate].window.rootViewController = VC;
            
//        [[NetworkManager manager] postWithURL:NET_GETSYSTEMTIME param:nil delegate:self isEncrypt:NO type:NetWorkingType0];
        
//    } else {
//
//        LoginViewController *VC = [[LoginViewController alloc] init];
//        WGMNavigationController *naviC = [[WGMNavigationController alloc] initWithRootViewController:VC];
//        [[UIApplication sharedApplication] delegate].window.rootViewController = naviC;
//
//    }

    
}

//#pragma mark - networkDelegate -
//- (void)networkingHandleSuccess:(NetworkingHandle *)handle parameters:(NSDictionary *)parameters responseObject:(id)responseObject type:(NetWorkingType)type{
//    [MobClick profileSignInWithPUID:responseObject[@"userId"]];
//    [self postNotificationName:kNotificationIsAnnouncement object:nil];
//    
//    [self setBackgroundTime:responseObject[@"sysDateTime"]];
//    self.beginTime = self.backgroundTime;
//    [self setIsShow:responseObject[@"isShow"]];
//    
////    CustumTabBarController *VC = [[CustumTabBarController alloc] init];
////    
////    [[UIApplication sharedApplication] delegate].window.rootViewController = VC;
//    
//}
//
//- (void)networkingHandlefail:(NetworkingHandle *)handle type:(NetWorkingType)type{
//    [self removeUserLoginInfo];
//
//}
//
//- (void)networkingHandleWarning:(NetworkingHandle *)handle responseObject:(id)responseObject type:(NetWorkingType)type{
//    
//    if ([responseObject[@"returnNo"] isEqualToString:@"0032"]) {
//        
//        UIAlertController *alertV = [UIAlertController alertControllerWithTitle:@"提示" message:responseObject[@"returnInfo"] preferredStyle:UIAlertControllerStyleAlert];
//        
//        __weak typeof(self) weakSelf = self;
//        
//        UIAlertAction *done = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//            
//            [weakSelf removeUserLoginInfo];
//        }];
//        
//        [alertV addAction:done];
//        
//        [AppDelegateInstance.window.rootViewController presentViewController:alertV animated:YES completion:nil];
//        
//    } else {
//    
//        
//        [self removeUserLoginInfo];
//        
//    }
//
//    
//}

@end
